package com.hewep.demo.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * @author YM20051
 * @date 2017/11/27 14:53
 */
@RestController
public class UserController {

    @Autowired
    UserService userService;

    @RequestMapping(value="/user",method= RequestMethod.GET)
    public List<String> readUserInfo(@RequestParam String name){
        String message = userService.getMessage();
        List<String> list = new ArrayList<>();
        list.add(message);
        return list;
    }
}
